package com.cc8w.util;

import com.alibaba.fastjson.JSON;

import java.io.Serializable;
import java.util.Map;

public class ResultData implements Serializable {

    private static final long serialVersionUID = 1L;

    private int code=1;
    private String message="success";
    private Map<String,Object> data;

    public ResultData() {

    }

    public ResultData(int code, String message, Map<String, Object> data) {
        this.code = code;
        this.message = message;
        this.data = data;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public Map<String, Object> getData() {
        return data;
    }

    public void setData(Map<String, Object> data) {
        this.data = data;
    }

    @Override
    public String toString() {
        return "ResultData{" +
                "code=" + code +
                ", message='" + message + '\'' +
                ", data=" + JSON.toJSONString(data) +
                '}';
    }
}
